<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function showMessage(){
		var rmessage = ${returnMessage};
		//var errMessage = ${errMessage};
		if(rmessage == 4){
			alert("上传成功");
		}
		else if(rmessage == 1){
			alert("您上传的excel列名有问题,请修改列名并重新上传");
		}
		else if(rmessage == 2){
			alert("您上传的excel信息不完整，请确认楼盘、楼栋、房号都是完整的");
		}
	}
</script>
</head>

<body onload="showMessage()">
	<table width="100%" height="100%">
	<tr>
		<td valign="top" height="100">
			<s:if test="%{role==0}">
			<jsp:include page="../readhead.jsp"/>
		</s:if>
		<s:elseif test="%{role==1}">
			<jsp:include page="../writehead.jsp"/>
		</s:elseif>
		<s:elseif test="%{role==2}">
			<jsp:include page="../head.jsp"/>
		</s:elseif>
		</td>
	</tr>
	</table>
	<div id="uplaodFile">
		<s:actionerror/>
		<s:form action="uploadXls" enctype="multipart/form-data" method="post" validate="true">
			<s:label value="导入Excel文件"></s:label>
			<s:file name="xlsxFile" label="请选择Excel文件"></s:file>
			<s:submit value="开始上传" method="importXls"></s:submit>
		</s:form>
	</div>
</body>
</html>